package DataAccess;

//////////////////////////////////////////////////////////////////////////
// �� �� ��: hy_info.cs
// �� �� ��: otyg
// ��������: DateTime.Now();
// ��    ��: ��װ���ݱ�[hy_info]��ز���
// ģ���޸�: 
//     2006-11-17  ֧��ChangePage�ؼ���ֻװ�ص�ǰҳ���ݹ���
//     2006-10-28  ����ͨ��DataRowView���쵥��������
//     2006-10-16  ���뼯�ϲ���foreach/Add/Remove�ȹ���,����Transaction����
// ��    Ȩ: ���������  QQ:1775068  
//////////////////////////////////////////////////////////////////////////
/** 
 Data Access Layer Object Of hy_info
*/
public class hy_info extends DataAccessBase
{
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ����ͻ���
	public hy_info()
	{
		super();
		_DataRow.setItem("Hy_Num", 0);
		_DataRow.setItem("Hy_Name", "");
		_DataRow.setItem("Hy_Email", "");
		_DataRow.setItem("Hy_Sex", "");
		_DataRow.setItem("Hy_Birthday", "");
		_DataRow.setItem("Hy_Work", "");
		_DataRow.setItem("Hy_Tel", "");
		_DataRow.setItem("Hy_Tel_Area", "");
		_DataRow.setItem("Hy_Tel_Fj", "");
		_DataRow.setItem("Hy_Post", "");
		_DataRow.setItem("Hy_Mobile_Tel", "");
		_DataRow.setItem("Hy_Guo", "");
		_DataRow.setItem("Hy_Sheng", "");
		_DataRow.setItem("Hy_shi", "");
		_DataRow.setItem("Add_Time", java.time.LocalDateTime.MIN);
		_DataRow.setItem("Hy_Qq", 0);
	}
	public hy_info(DataRow dataRow)
	{
		super(dataRow);
	}
	public hy_info(DataRowView dataRowView)
	{
		super(dataRowView);
	}
	@Override
	protected DataRow BuildRow()
	{
		DataTable dt = new DataTable();
		dt.Columns.Add("Hy_Num",Integer.class);
		dt.Columns.Add("Hy_Name",String.class);
		dt.Columns.Add("Hy_Email",String.class);
		dt.Columns.Add("Hy_Sex",String.class);
		dt.Columns.Add("Hy_Birthday",String.class);
		dt.Columns.Add("Hy_Work",String.class);
		dt.Columns.Add("Hy_Tel",String.class);
		dt.Columns.Add("Hy_Tel_Area",String.class);
		dt.Columns.Add("Hy_Tel_Fj",String.class);
		dt.Columns.Add("Hy_Post",String.class);
		dt.Columns.Add("Hy_Mobile_Tel",String.class);
		dt.Columns.Add("Hy_Guo",String.class);
		dt.Columns.Add("Hy_Sheng",String.class);
		dt.Columns.Add("Hy_shi",String.class);
		dt.Columns.Add("Add_Time",java.time.LocalDateTime.class);
		dt.Columns.Add("Hy_Qq",Integer.class);
		return dt.NewRow();
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ����ͻ���
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ����
	public final DataRow getDataRow()
	{
		return super._DataRow;
	}
	public final int getHy_Num()
	{
		return Integer.parseInt(_DataRow.getItem("Hy_Num").toString());
	}
	public final void setHy_Num(int value)
	{
		_DataRow.setItem("Hy_Num", value);
	}
	public final String getHy_Name()
	{
		return _DataRow.getItem("Hy_Name").toString();
	}
	public final void setHy_Name(String value)
	{
		_DataRow.setItem("Hy_Name", value);
	}
	public final int getHy_Qq()
	{
		return Integer.parseInt(_DataRow.getItem("Hy_Qq").toString());
	}
	public final void setHy_Qq(int value)
	{
		_DataRow.setItem("Hy_Qq", value);
	}
	public final String getHy_Email()
	{
		return _DataRow.getItem("Hy_Email").toString();
	}
	public final void setHy_Email(String value)
	{
		_DataRow.setItem("Hy_Email", value);
	}
	public final String getHy_Sex()
	{
		return _DataRow.getItem("Hy_Sex").toString();
	}
	public final void setHy_Sex(String value)
	{
		_DataRow.setItem("Hy_Sex", value);
	}
	public final String getHy_Birthday()
	{
		return _DataRow.getItem("Hy_Birthday").toString();
	}
	public final void setHy_Birthday(String value)
	{
		_DataRow.setItem("Hy_Birthday", value);
	}
	public final String getHy_Work()
	{
		return _DataRow.getItem("Hy_Work").toString();
	}
	public final void setHy_Work(String value)
	{
		_DataRow.setItem("Hy_Work", value);
	}
	public final String getHy_Tel()
	{
		return _DataRow.getItem("Hy_Tel").toString();
	}
	public final void setHy_Tel(String value)
	{
		_DataRow.setItem("Hy_Tel", value);
	}
	public final String getHy_Tel_Area()
	{
		return _DataRow.getItem("Hy_Tel_Area").toString();
	}
	public final void setHy_Tel_Area(String value)
	{
		_DataRow.setItem("Hy_Tel_Area", value);
	}
	public final String getHy_Tel_Fj()
	{
		return _DataRow.getItem("Hy_Tel_Fj").toString();
	}
	public final void setHy_Tel_Fj(String value)
	{
		_DataRow.setItem("Hy_Tel_Fj", value);
	}
	public final String getHy_Post()
	{
		return _DataRow.getItem("Hy_Post").toString();
	}
	public final void setHy_Post(String value)
	{
		_DataRow.setItem("Hy_Post", value);
	}
	public final String getHy_Mobile_Tel()
	{
		return _DataRow.getItem("Hy_Mobile_Tel").toString();
	}
	public final void setHy_Mobile_Tel(String value)
	{
		_DataRow.setItem("Hy_Mobile_Tel", value);
	}
	public final String getHy_Guo()
	{
		return _DataRow.getItem("Hy_Guo").toString();
	}
	public final void setHy_Guo(String value)
	{
		_DataRow.setItem("Hy_Guo", value);
	}
	public final String getHy_Sheng()
	{
		return _DataRow.getItem("Hy_Sheng").toString();
	}
	public final void setHy_Sheng(String value)
	{
		_DataRow.setItem("Hy_Sheng", value);
	}
	public final String getHy_shi()
	{
		return _DataRow.getItem("Hy_shi").toString();
	}
	public final void setHy_shi(String value)
	{
		_DataRow.setItem("Hy_shi", value);
	}
	public final java.time.LocalDateTime getAdd_Time()
	{
		return java.time.LocalDateTime.parse(_DataRow.getItem("Add_Time").toString());
	}
	public final void setAdd_Time(java.time.LocalDateTime value)
	{
		_DataRow.setItem("Add_Time", value);
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ����
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ��������
	protected final boolean DeleteByCondition(String condition)
	{
		String sql = "" + "\r\n" +
"				Delete From hy_info" + "\r\n" +
"				WHERE " + condition;
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		super.ExecuteSQL(sql);
//#else
		try
		{
			super.ExecuteSQL(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		return true;
	}
	public final boolean Delete(int Hy_Num)
	{
		String condition = "Hy_Num=" + String.valueOf(Hy_Num);
		return DeleteByCondition(condition);
	}
	public final boolean Delete()
	{
		String condition = "Hy_Num=" + String.valueOf(getHy_Num());
		return DeleteByCondition(condition);
	}
	public final boolean Insert()
	{
			String sql = "" + "\r\n" +
"				Insert Into hy_info (" + "\r\n" +
"				" + "\r\n" +
"					Hy_Name," + "\r\n" +
"					Hy_Email," + "\r\n" +
"					Hy_Sex," + "\r\n" +
"					Hy_Birthday," + "\r\n" +
"					Hy_Work," + "\r\n" +
"					Hy_Tel," + "\r\n" +
"					Hy_Tel_Area," + "\r\n" +
"					Hy_Tel_Fj," + "\r\n" +
"					Hy_Post," + "\r\n" +
"					Hy_Mobile_Tel," + "\r\n" +
"					Hy_Guo," + "\r\n" +
"					Hy_Sheng," + "\r\n" +
"					Hy_shi," + "\r\n" +
"					Hy_Qq," + "\r\n" +
"					Add_Time" + "\r\n" +
"				) Values (" + "\r\n" +
"			" + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Name()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Email()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Sex()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Birthday()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Work()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Tel()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Tel_Area()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Tel_Fj()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Post()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Mobile_Tel()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Guo()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_Sheng()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_shi()) + "," + "\r\n" +
"					" + getHy_Qq() + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getAdd_Time().toString()) + "\r\n" +
"				)";
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		super.ExecuteSQL(sql);
//#else
		try
		{
			super.ExecuteSQL(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		return true;
	}
	protected final boolean SelectByCondition(String condition)
	{
		String sql = "" + "\r\n" +
"				Select" + "\r\n" +
"					Hy_Num," + "\r\n" +
"					Hy_Name," + "\r\n" +
"					Hy_Email," + "\r\n" +
"					Hy_Sex," + "\r\n" +
"					Hy_Birthday," + "\r\n" +
"					Hy_Work," + "\r\n" +
"					Hy_Tel," + "\r\n" +
"					Hy_Tel_Area," + "\r\n" +
"					Hy_Tel_Fj," + "\r\n" +
"					Hy_Post," + "\r\n" +
"					Hy_Mobile_Tel," + "\r\n" +
"					Hy_Guo," + "\r\n" +
"					Hy_Sheng," + "\r\n" +
"					Hy_shi," + "\r\n" +
"					Hy_Qq," + "\r\n" +
"					Add_Time" + "\r\n" +
"				  From hy_info" + "\r\n" +
"				 Where " + condition + "\r\n" +
"			";
		DataTable dt;
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		dt = super.GetDataTable(sql);
//#else
		try
		{
			dt = super.GetDataTable(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		try
		{
			_DataRow = dt.Rows[0];
		}
		catch (java.lang.Exception e2)
		{
			return false;
		}
		return true;
	}
	public final boolean SelectByPk(int Hy_Num)
	{
		String condition = "1=1" + "\r\n" +
"				   And Hy_Num=" + String.valueOf(Hy_Num) + "\r\n" +
"			";
		return SelectByCondition(condition);
	}
	public final boolean Update()
	{
		String sql = "" + "\r\n" +
"				Update hy_info SET" + "\r\n" +
"					Hy_Name=" + Helper.ToSQLParamStr(getHy_Name()) + "," + "\r\n" +
"					Hy_Email=" + Helper.ToSQLParamStr(getHy_Email()) + "," + "\r\n" +
"					Hy_Sex=" + Helper.ToSQLParamStr(getHy_Sex()) + "," + "\r\n" +
"					Hy_Birthday=" + Helper.ToSQLParamStr(getHy_Birthday()) + "," + "\r\n" +
"					Hy_Work=" + Helper.ToSQLParamStr(getHy_Work()) + "," + "\r\n" +
"					Hy_Tel=" + Helper.ToSQLParamStr(getHy_Tel()) + "," + "\r\n" +
"					Hy_Tel_Area=" + Helper.ToSQLParamStr(getHy_Tel_Area()) + "," + "\r\n" +
"					Hy_Tel_Fj=" + Helper.ToSQLParamStr(getHy_Tel_Fj()) + "," + "\r\n" +
"					Hy_Post=" + Helper.ToSQLParamStr(getHy_Post()) + "," + "\r\n" +
"					Hy_Mobile_Tel=" + Helper.ToSQLParamStr(getHy_Mobile_Tel()) + "," + "\r\n" +
"					Hy_Guo=" + Helper.ToSQLParamStr(getHy_Guo()) + "," + "\r\n" +
"					Hy_Sheng=" + Helper.ToSQLParamStr(getHy_Sheng()) + "," + "\r\n" +
"					Hy_shi=" + Helper.ToSQLParamStr(getHy_shi()) + "," + "\r\n" +
"					Hy_Qq=" + String.valueOf(getHy_Qq()) + "," + "\r\n" +
"					Add_Time=" + Helper.ToSQLParamStr(getAdd_Time().toString()) + "\r\n" +
"					" + "\r\n" +
"				Where 1=1" + "\r\n" +
" 				  And Hy_Num= " + String.valueOf(getHy_Num()) + "\r\n" +
"				";
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		return (super.ExecuteSQL(sql) >= 1);
//#else
		try
		{
			return (super.ExecuteSQL(sql) == 1);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
	}

//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ��������
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ���淽��
	public final boolean SelectByName(String Hy_Name)
	{
		String condition = "1=1" + "\r\n" +
"				   And Hy_name=" + Helper.ToSQLParamStr(Hy_Name) + "\r\n" +
"			";
		return SelectByCondition(condition);
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ���淽��
}